package com.example.time;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TestDate {

    public static void main(String[] args) {
        String dateString = "2020-02-21";
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH");

        try {
            Date date = format.parse(dateString);
            System.out.println("Parsed Date: " + date);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
}
